Skip to content

Conversation

@adityaalifn
Copy link
Contributor

@adityaalifn adityaalifn commented Apr 14, 2025

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

POST /threads API now supports filter and sort params using Mongo style query. We add support to Java SDK.

Example:

// Query threads with filter for the specific channel and sort by created_at in descending order
Thread.QueryThreadsResponse response =
    Thread.queryThreads()
        .userId(user.getId())
        .filter(FilterCondition.eq("channel_cid", channel.getChannel().getCId()))
        .sort(Sort.builder().field("created_at").direction(Sort.Direction.DESC).build())
        .request();

@adityaalifn adityaalifn merged commit 5c415db into main Apr 14, 2025
1 check passed
@adityaalifn adityaalifn deleted the add-query-threads branch April 14, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants